<!DOCTYPE html>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="x-ua-compatible" content="IE=edge" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi"
    />
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <link rel="icon" href="images/favicon.png" />
    <link
      rel="stylesheet"
      type="text/css"
      href="webjars/simonwep__pickr/1.2.6/dist/themes/monolith.min.css"
    />
    <link rel="stylesheet" type="text/css" href="app.dev.css" />
    <title>远程连接</title>

    <script>
      // 从 URL 查询字符串中获取参数
      const urlParams = new URLSearchParams(window.location.search);

      window.IAAS_PARAMETERS = {
        id: urlParams.get("instanceId"),
        ConsoleURL: urlParams.get("url"),
        InstanceId: urlParams.get("instanceId"),
        Ip: urlParams.get("ip"),
        Password: decodeURIComponent(urlParams.get("password")),
        UserName: "ecs",
        onMessage: function (message) {},
      };
    </script>

    <style>
      body {
        background-color: #000;
      }
    </style>
  </head>

  <body>
    <div id="guac-client" ng-controller="indexController">
      <guac-client-page></guac-client-page>
    </div>
    <div id="guac-login"></div>

    <!-- Utility libraries -->
    <script
      type="text/javascript"
      src="webjars/jquery/3.3.1/dist/jquery.min.js"
    ></script>
    <script
      type="text/javascript"
      src="webjars/lodash/4.17.10/dist/lodash.min.js"
    ></script>

    <!-- AngularJS -->
    <script
      type="text/javascript"
      src="webjars/angular/1.6.9/angular.min.js"
    ></script>
    <script
      type="text/javascript"
      src="webjars/angular-touch/1.6.9/angular-touch.min.js"
    ></script>

    <!-- Internationalization -->
    <script
      type="text/javascript"
      src="webjars/messageformat/1.0.2/messageformat.min.js"
    ></script>
    <script
      type="text/javascript"
      src="webjars/angular-translate/2.16.0/angular-translate.min.js"
    ></script>
    <script
      type="text/javascript"
      src="webjars/angular-translate-interpolation-messageformat/2.16.0/angular-translate-interpolation-messageformat.min.js"
    ></script>
    <script
      type="text/javascript"
      src="webjars/angular-translate-loader-static-files/2.16.0/angular-translate-loader-static-files.min.js"
    ></script>

    <!-- JSTZ -->
    <script
      type="text/javascript"
      src="webjars/jstz/1.0.10/dist/jstz.min.js"
    ></script>

    <!-- Pickr (color picker) -->
    <script
      type="text/javascript"
      src="webjars/simonwep__pickr/1.2.6/dist/pickr.es5.min.js"
    ></script>

    <!-- Polyfills for the "datalist" element, Blob and the FileSaver API -->
    <script
      type="text/javascript"
      src="webjars/blob-polyfill/1.0.20150320/Blob.js"
    ></script>
    <script
      type="text/javascript"
      src="webjars/datalist-polyfill/1.14.0/datalist-polyfill.min.js"
    ></script>
    <script
      type="text/javascript"
      src="webjars/filesaver/1.3.3/FileSaver.min.js"
    ></script>

    <!-- Allow arbitrary ordering of Angular module creation and retrieval -->
    <script
      type="text/javascript"
      src="webjars/angular-module-shim/0.0.4/angular-module-shim.js"
    ></script>

    <!-- Web application -->
    <script type="text/javascript" src="app.dev.js"></script>
    <script>
      angular.bootstrap(document.getElementById("guac-client"), ["index"]);
    </script>
  </body>
</html>
